package com.ruoyi.rules.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.rules.mapper.SmartChargingRuleMapper;
import com.ruoyi.rules.domain.SmartChargingRule;
import com.ruoyi.rules.service.ISmartChargingRuleService;

/**
 * 所有收费规则Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-27
 */
@Service
public class SmartChargingRuleServiceImpl implements ISmartChargingRuleService 
{
    @Autowired
    private SmartChargingRuleMapper smartChargingRuleMapper;

    /**
     * 查询所有收费规则
     * 
     * @param scRuleId 所有收费规则主键
     * @return 所有收费规则
     */
    @Override
    public SmartChargingRule selectSmartChargingRuleByScRuleId(Long scRuleId)
    {
        return smartChargingRuleMapper.selectSmartChargingRuleByScRuleId(scRuleId);
    }

    /**
     * 查询所有收费规则列表
     * 
     * @param smartChargingRule 所有收费规则
     * @return 所有收费规则
     */
    @Override
    public List<SmartChargingRule> selectSmartChargingRuleList(SmartChargingRule smartChargingRule)
    {
        return smartChargingRuleMapper.selectSmartChargingRuleList(smartChargingRule);
    }

    /**
     * 新增所有收费规则
     * 
     * @param smartChargingRule 所有收费规则
     * @return 结果
     */
    @Override
    public int insertSmartChargingRule(SmartChargingRule smartChargingRule)
    {
        return smartChargingRuleMapper.insertSmartChargingRule(smartChargingRule);
    }

    /**
     * 修改所有收费规则
     * 
     * @param smartChargingRule 所有收费规则
     * @return 结果
     */
    @Override
    public int updateSmartChargingRule(SmartChargingRule smartChargingRule)
    {
        return smartChargingRuleMapper.updateSmartChargingRule(smartChargingRule);
    }

    /**
     * 批量删除所有收费规则
     * 
     * @param scRuleIds 需要删除的所有收费规则主键
     * @return 结果
     */
    @Override
    public int deleteSmartChargingRuleByScRuleIds(Long[] scRuleIds)
    {
        return smartChargingRuleMapper.deleteSmartChargingRuleByScRuleIds(scRuleIds);
    }

    /**
     * 删除所有收费规则信息
     * 
     * @param scRuleId 所有收费规则主键
     * @return 结果
     */
    @Override
    public int deleteSmartChargingRuleByScRuleId(Long scRuleId)
    {
        return smartChargingRuleMapper.deleteSmartChargingRuleByScRuleId(scRuleId);
    }
}
